package com.xiaoshuidi.cloud.module.member.api.point;


import com.xiaoshuidi.cloud.framework.common.pojo.CommonResult;
import com.xiaoshuidi.cloud.module.member.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/***
 * @author leo.li
 * @date 2023-06-07 21:20:24
 */

@FeignClient(name = ApiConstants.SERVERNAME)
@Tag(name = "RPC 服务 - 积分")
public interface PointsApi {

    String PREFIX = ApiConstants.PREFIX + "/point";

    @PostMapping(PREFIX + "/plus_point")
    @Operation(summary = "增加积分")
    CommonResult<Boolean> plusTenantPoint(@RequestParam("tenantUserid") Long tenantUserId,
                                      @RequestParam("point") Integer point,
                                      @RequestParam("recordType") Integer recordType,
                                      @RequestParam("remark") String remark);

    @PostMapping(PREFIX + "/minus_point")
    @Operation(summary = "使用积分")
    CommonResult<Boolean> minusTenantPoint(@RequestParam("tenantUserid") Long tenantUserId,
                                          @RequestParam("point") Integer point,
                                          @RequestParam("recordType") Integer recordType,
                                          @RequestParam("remark") String remark);
}
